package com.aaa.rent.controller.api;

import com.aaa.rent.service.ReturnCarService;
import com.aaa.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 崔灿
 * @Date 2023/03/14 18:41
 * @ClassName ReturnCarController
 * @Description
 * @Version 1.0
 */

@Api(value = "rent/return", tags = {"api返回车辆控制"})
@RestController
@RequestMapping("rent/return")
public class ApiReturnCarController {

    @Autowired
    private ReturnCarService returnCarService;


    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "id", value = "", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "status", value = "", required = true)
    })
    @ApiOperation(value = "", notes = "", httpMethod = "POST")
    @PostMapping("returncar")
    public Result SelectCar(Integer id,Integer status){
        return returnCarService.selectCar(id,status);
    }
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "int", name = "id", value = "", required = true)
    })
    @ApiOperation(value = "", notes = "", httpMethod = "POST")
    @PostMapping("111")
    public Result returncar(Integer id){
        return returnCarService.returncar(id);
    }
}
